package com.guigu.service.impl.manufacture;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.guigu.mapper.manufacture.MDesignProcedureModuleMapper;
import com.guigu.pojo.manufacture.MDesignProcedureModule;
import com.guigu.service.manufacture.MDesignProcedureModuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Mr.Zhang
 * @since 2024-12-06
 */
@Service
public class MDesignProcedureModuleServiceImpl extends ServiceImpl<MDesignProcedureModuleMapper, MDesignProcedureModule> implements MDesignProcedureModuleService {

    @Autowired
    private MDesignProcedureModuleMapper mDesignProcedureModuleMapper;

    @Override
    public ArrayList<MDesignProcedureModule> selectArrByParentId(Integer id) {
        QueryWrapper<MDesignProcedureModule> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("PARENT_ID", id);
        queryWrapper.orderByAsc("DETAILS_NUMBER");
        ArrayList<MDesignProcedureModule> mDesignProcedureModules = (ArrayList<MDesignProcedureModule>) mDesignProcedureModuleMapper.selectList(queryWrapper);
        return mDesignProcedureModules;
    }
}
